400
|
How can I change the first visible date in the chart
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():LevelCount := 2
oGantt:Chart():FirstVisibleDate := "01/01/2002"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
399
|
How can I scroll or ensure that a specified date time is visible in the chart
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():LevelCount := 2
oGantt:Chart():FirstVisibleDate := "01/01/2002"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
398
|
How can I scroll or ensure that a specified date time is visible to the right side of the chart or control
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():LevelCount := 2
oGantt:Chart():ScrollTo("01/01/2002",2)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
397
|
How can I scroll or ensure that a specified date time is visible
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():LevelCount := 2
oGantt:Chart():ScrollTo("01/01/2002",2)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
396
|
How can I show or hide the the tooltip being shown when the user scrolls the chart
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():ToolTip := ""
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
395
|
How can I change the format of the tooltip when the user scrolls the chart
![](images/exganttq395.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():ToolTip := "ToolTip: <b><%dddd%></b>"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
394
|
How can I hide the chart's scroll bar
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():ScrollBar := .F.
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
393
|
How can I specify the first day of the week
![](images/exganttq393.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():LevelCount := 2
oGantt:Chart():FirstWeekDay := 1/*exMonday*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
392
|
How do I change the AM or PM shortcuts in the chart's header
![](images/exganttq392.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oLevel
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():UnitWidth := 64
oGantt:Chart():AMPM := "A P"
oLevel := oGantt:Chart():Level(0)
oLevel:Label := "<%h%> <%AM/PM%>"
oLevel:Unit := 65536/*exHour*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
391
|
How do I change the name for the months, being displayed in the chart's header
![](images/exganttq391.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oLevel
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():UnitWidth := 64
oGantt:Chart():MonthNames := "Ianuarie Februarie Martie Aprilie Mai Iunie Iulie August Septembrie Octombrie Noiembrie Decembrie"
oLevel := oGantt:Chart():Level(0)
oLevel:Label := "<b><%mmmm%></b>"
oLevel:Unit := 16/*exMonth*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
390
|
How do I change the name for the week days, being displayed in the chart's header
![](images/exganttq390.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():UnitWidth := 64
oGantt:Chart():WeekDays := "Duminica Luni Marti Miercuri Joi Vineri Simbata"
oGantt:Chart():Level(0):Label := "<b><%mm%></b>/<%dddd%>"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
389
|
How do I access a level in the chart's header
![](images/exganttq389.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():UnitWidth := 64
oGantt:Chart():Level(0):Label := "<b><%mm%></b>/<%dd%>"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
388
|
How can I change the color for the grid lines between the leves in the chart's header
![](images/exganttq388.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oGantt:Chart():LevelCount := 2
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
387
|
How can I show or hide the grid lines between the leves in the chart's header
![](images/exganttq387.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oChart
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oChart := oGantt:Chart()
oChart:LevelCount := 2
oChart:Level(0):DrawTickLines := .F.
oChart:Level(1):DrawTickLines := .F.
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
386
|
How do I change the foreground color for the chart's header
![](images/exganttq386.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():SetProperty("ForeColorLevelHeader",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
385
|
How do I change the background color for the chart's header
![](images/exganttq385.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():SetProperty("BackColorLevelHeader",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
384
|
How do I specify the chart's foreground color
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
383
|
How do I specify the chart's background color
![](images/exganttq383.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
382
|
How do I put a picture on the center of the chart
![](images/exganttq382.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():Picture := oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
oGantt:Chart():PictureDisplay := 17/*MiddleCenter*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
381
|
How do I resize/stretch a picture on the chart's background
![](images/exganttq381.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():Picture := oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
oGantt:Chart():PictureDisplay := 49/*Stretch*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
380
|
How do I put a picture on the chart's center right bottom side
![](images/exganttq380.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():Picture := oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
oGantt:Chart():PictureDisplay := 34/*LowerRight*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
379
|
How do I put a picture on the chart's center left bottom side
![](images/exganttq379.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():Picture := oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
oGantt:Chart():PictureDisplay := 32/*LowerLeft*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
378
|
How do I put a picture on the chart's center top side
![](images/exganttq378.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():Picture := oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
oGantt:Chart():PictureDisplay := 1/*UpperCenter*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
377
|
How do I put a picture on the chart's right top corner
![](images/exganttq377.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():Picture := oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
oGantt:Chart():PictureDisplay := 2/*UpperRight*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
376
|
How do I put a picture on the chart's left top corner
![](images/exganttq376.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():Picture := oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
oGantt:Chart():PictureDisplay := 0/*UpperLeft*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
375
|
How do I put a picture on the chart's background
![](images/exganttq375.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():Picture := oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
374
|
How to specify the width for the left or side pane
![](images/exganttq374.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():SetProperty("PaneWidth",.F.,128)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
373
|
How do I display the header of the chart using multiple levels, lines
![](images/exganttq373.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():LevelCount := 2
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
372
|
How do change the width of the chart's area
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():SetProperty("PaneWidth",.T.,256)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
371
|
How do I show or hide the control's chart area
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():SetProperty("PaneWidth",.T.,0)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
370
|
How do I access the chart's area of the control
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Chart():SetProperty("PaneWidth",.F.,64)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
369
|
How do I change the control's border, using your EBN files
![](images/exganttq369.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oGantt:Appearance := 16777216/*0x1000000+*/
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
368
|
Can I change the default border of the tooltip, using your EBN files
![](images/exganttq368.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:ToolTipDelay := 1
oGantt:ToolTipWidth := 364
oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oGantt:SetProperty("Background",64/*exToolTipAppearance*/,0x1000000)
oGantt:Columns():Add("tootip"):ToolTip := "this is a tooltip assigned to a column"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
367
|
Can I change the background color for the tooltip
![](images/exganttq367.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:ToolTipDelay := 1
oGantt:ToolTipWidth := 364
oGantt:SetProperty("Background",65/*exToolTipBackColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oGantt:Columns():Add("tootip"):ToolTip := "this is a tooltip assigned to a column"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
366
|
Does the tooltip support HTML format
![](images/exganttq366.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:ToolTipDelay := 1
oGantt:ToolTipWidth := 364
oGantt:Columns():Add("tootip"):ToolTip := "<font Tahoma;11>T</font>his is an HTML <b>tooltip</b> assigned to a <fgcolor=FF0000>column</fgcolor>"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
365
|
Can I change the forecolor for the tooltip
![](images/exganttq365.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:ToolTipDelay := 1
oGantt:ToolTipWidth := 364
oGantt:SetProperty("Background",66/*exToolTipForeColor*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oGantt:Columns():Add("tootip"):ToolTip := "this is a tooltip assigned to a column"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
364
|
Can I change the foreground color for the tooltip
![](images/exganttq364.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:ToolTipDelay := 1
oGantt:ToolTipWidth := 364
oGantt:Columns():Add("tootip"):ToolTip := "<fgcolor=FF0000>this is a tooltip assigned to a column</fgcolor>"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
363
|
How can I merge cells
![](images/exganttq363.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:DrawGridLines := -1/*exAllLines*/
oGantt:MarkSearchColumn := .F.
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oGantt:Columns():Add("C3")
oItems := oGantt:Items()
h := oItems:AddItem("this cell merges the first two columns")
oItems:SetProperty("CellMerge",h,0,1)
h := oItems:AddItem()
oItems:SetProperty("CellCaption",h,1,"this cell merges the last two columns")
oItems:SetProperty("CellMerge",h,1,2)
h := oItems:AddItem("this cell merges the all three columns")
oItems:SetProperty("CellMerge",h,0,1)
oItems:SetProperty("CellMerge",h,0,2)
h := oItems:AddItem("this draws a divider item")
oItems:SetProperty("ItemDivider",h,0)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
362
|
How can I merge cells
![](images/exganttq362.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:MarkSearchColumn := .F.
oGantt:TreeColumnIndex := -1
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
h := oItems:AddItem("This is bit of text merges all cells in the item")
oItems:SetProperty("ItemDivider",h,0)
oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
361
|
How can I specify the width for a splited cell
![](images/exganttq361.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h,s,s1
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:DrawGridLines := -2/*exRowLines*/
oGantt:Columns():Add("Single Column")
oItems := oGantt:Items()
h := oItems:AddItem("Split 1")
s := oItems:SplitCell(h,0)
oItems:SetProperty("CellWidth",,s,64)
oItems:SetProperty("CellCaption",,s,"Split 2")
s1 := oItems:SplitCell(,s)
oItems:SetProperty("CellCaption",,s1,"Split 3")
oItems:SetProperty("CellWidth",,s1,64)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
360
|
How can I split a cell in three parts
![](images/exganttq360.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h,s,s1
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:DrawGridLines := -2/*exRowLines*/
oGantt:Columns():Add("Single Column")
oItems := oGantt:Items()
h := oItems:AddItem("Split 1")
s := oItems:SplitCell(h,0)
oItems:SetProperty("CellCaption",,s,"Split 2")
s1 := oItems:SplitCell(,s)
oItems:SetProperty("CellCaption",,s1,"Split 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
359
|
How can I add a button aligned to right
![](images/exganttq359.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL s
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGantt:Columns():Add("Single Column")
oGantt:ShowFocusRect := .F.
oItems := oGantt:Items()
oItems:SetProperty("ItemDivider",oItems:AddItem("This is a bit of text being displayed on the entire item"),0)
s := oItems:SplitCell(oItems:AddItem("Split Cell 1.1"),0)
oItems:SetProperty("CellCaption",,s,"Split Cell <img>1</img>")
oItems:SetProperty("CellCaptionFormat",,s,1/*exHTML*/)
oItems:SetProperty("CellHAlignment",,s,1/*CenterAlignment*/)
oItems:SetProperty("CellHasButton",,s,.T.)
oItems:SetProperty("CellWidth",,s,84)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
358
|
How can I split a cell
![](images/exganttq358.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL s
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:DrawGridLines := -2/*exRowLines*/
oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oGantt:Columns():Add("Single Column")
oGantt:ShowFocusRect := .F.
oItems := oGantt:Items()
s := oItems:SplitCell(oItems:AddItem("Split Cell 1.1"),0)
oItems:SetProperty("CellCaption",,s,"Split Cell <img>1</img>")
oItems:SetProperty("CellCaptionFormat",,s,1/*exHTML*/)
oItems:SetProperty("CellHAlignment",,s,1/*CenterAlignment*/)
oItems:SetProperty("CellBackColor",,s,0x1000000)
oItems:SetProperty("CellWidth",,s,84)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
357
|
Can I select an item giving its general position
![](images/exganttq357.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SelectPos := 1
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
356
|
How can I change the color for separator / dividers items
![](images/exganttq356.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oGantt:MarkSearchColumn := .F.
oGantt:TreeColumnIndex := -1
oGantt:ScrollBySingleLine := .F.
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
h := oItems:AddItem()
oItems:SetProperty("ItemDivider",h,0)
oItems:SetProperty("ItemDividerLine",h,4/*DoubleDotLine*/)
oItems:SetProperty("ItemDividerLineAlignment",h,1/*DividerCenter*/)
oItems:SetProperty("ItemHeight",h,6)
oItems:SetProperty("SelectableItem",h,.F.)
h := oItems:AddItem("Cell 2")
oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
355
|
How can I add separator - dividers items
![](images/exganttq355.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:MarkSearchColumn := .F.
oGantt:TreeColumnIndex := -1
oGantt:ScrollBySingleLine := .F.
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
h := oItems:AddItem()
oItems:SetProperty("ItemDivider",h,0)
oItems:SetProperty("ItemDividerLine",h,4/*DoubleDotLine*/)
oItems:SetProperty("ItemDividerLineAlignment",h,1/*DividerCenter*/)
oItems:SetProperty("ItemHeight",h,6)
oItems:SetProperty("SelectableItem",h,.F.)
h := oItems:AddItem("Cell 2")
oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
354
|
Can I change the style of the line being displayed by a divider item
![](images/exganttq354.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:MarkSearchColumn := .F.
oGantt:TreeColumnIndex := -1
oGantt:ScrollBySingleLine := .F.
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
h := oItems:AddItem("This is bit of text that's displayed on the entire item, divider.")
oItems:SetProperty("ItemDivider",h,0)
oItems:SetProperty("ItemDividerLine",h,4/*DoubleDotLine*/)
oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
oItems:SetProperty("ItemHeight",h,24)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
353
|
Can I remove the line being displayed by a divider item
![](images/exganttq353.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:MarkSearchColumn := .F.
oGantt:TreeColumnIndex := -1
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
h := oItems:AddItem("This is bit of text that's displayed on the entire item, divider.")
oItems:SetProperty("ItemDivider",h,0)
oItems:SetProperty("ItemDividerLine",h,0/*EmptyLine*/)
oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
352
|
How can I display a divider item, merging all cells
![](images/exganttq352.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:MarkSearchColumn := .F.
oGantt:TreeColumnIndex := -1
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
h := oItems:AddItem("This is bit of text that's displayed on the entire item, divider.")
oItems:SetProperty("ItemDivider",h,0)
oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
351
|
How can I fix or lock items
![](images/exganttq351.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("LockedItemCount",0/*TopAlignment*/,1)
oItems:SetProperty("CellCaption",oItems:LockedItem(0/*TopAlignment*/,0),0,"This is a locked item, fixed to the top side of the control.")
oItems:SetProperty("ItemBackColor",oItems:LockedItem(0/*TopAlignment*/,0),AutomationTranslateColor( GraMakeRGBColor ( { 196,196,186 } ) , .F. ))
oItems:SetProperty("LockedItemCount",2/*BottomAlignment*/,2)
oItems:SetProperty("CellCaption",oItems:LockedItem(2/*BottomAlignment*/,0),0,"This is a locked item, fixed to the top side of the control.")
oItems:SetProperty("ItemBackColor",oItems:LockedItem(2/*BottomAlignment*/,0),AutomationTranslateColor( GraMakeRGBColor ( { 196,196,186 } ) , .F. ))
oItems:SetProperty("CellCaption",oItems:LockedItem(2/*BottomAlignment*/,1),0,"This is a locked item, fixed to the top side of the control.")
oItems:SetProperty("ItemBackColor",oItems:LockedItem(2/*BottomAlignment*/,1),AutomationTranslateColor( GraMakeRGBColor ( { 186,186,186 } ) , .F. ))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
350
|
How can I fix or lock an item on the bottom side of the control
![](images/exganttq350.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("LockedItemCount",2/*BottomAlignment*/,1)
oItems:SetProperty("CellCaption",oItems:LockedItem(2/*BottomAlignment*/,0),0,"This is a locked item, fixed to the bottom side of the control.")
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
349
|
How can I fix or lock an item on the top of the control
![](images/exganttq349.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("LockedItemCount",0/*TopAlignment*/,1)
oItems:SetProperty("CellCaption",oItems:LockedItem(0/*TopAlignment*/,0),0,"This is a locked item, fixed to the top side of the control.")
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
348
|
Is there any function to limit the height of the items when I display it using multiple lines
![](images/exganttq348.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:ScrollBySingleLine := .T.
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
oItems:SetProperty("ItemMaxHeight",h,48)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
347
|
Why I cannot center my cells in the column
![](images/exganttq347.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:TreeColumnIndex := -1
oGantt:DrawGridLines := -2/*exRowLines*/
oGantt:Columns():Add("Default"):Alignment := 1/*CenterAlignment*/
oGantt:Items():AddItem("item 1")
oGantt:Items():AddItem("item 2")
oGantt:Items():AddItem("item 3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
346
|
How can I align the cell to the left, center or to the right
![](images/exganttq346.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:TreeColumnIndex := -1
oGantt:DrawGridLines := -2/*exRowLines*/
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("CellHAlignment",oItems:AddItem("left"),0,0/*LeftAlignment*/)
oItems:SetProperty("CellHAlignment",oItems:AddItem("center"),0,1/*CenterAlignment*/)
oItems:SetProperty("CellHAlignment",oItems:AddItem("right"),0,2/*RightAlignment*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
345
|
How do I apply HTML format to a cell
![](images/exganttq345.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:TreeColumnIndex := -1
oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGantt:SetProperty("HTMLPicture","p1","c:\exontrol\images\zipdisk.gif")
oGantt:SetProperty("HTMLPicture","p2","c:\exontrol\images\auction.gif")
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("The following item shows some of the HTML format supported:")
oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
h := oItems:AddItem("<br>text icons <img>1</img>, <img>2</img>, ... pictures <img>p1</img>, <img>p2</img> <br><br>text <b>bold</b>, <i>italic</i>, <u>underline</u>, <s>strikeout</s>, ...<br><dotline>and so on...<br> <a>anchor</a> or <a2>hyperlink</a><br><fgcolor=FF0000>fgcolor</fgcolor> or <bgcolor=00FF00>bgcolor</bgcolor> ")
oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
344
|
How can I change the font for a cell
![](images/exganttq344.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oGantt:Items():AddItem("std font")
oItems := oGantt:Items()
oItems:SetProperty("CellCaptionFormat",oItems:AddItem("this <font tahoma;12>is a bit of text with</font> a different font"),0,1/*exHTML*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
343
|
How can I change the font for a cell
![](images/exganttq343.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL f
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oGantt:Items():AddItem("default font")
f := CreateObject("StdFont")
f:Name := "Tahoma"
f:Size := 12
oItems := oGantt:Items()
oItems:SetProperty("CellFont",oItems:AddItem("new font"),0,f)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
342
|
How can I change the font for entire item
![](images/exganttq342.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL f
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oGantt:Items():AddItem("default font")
f := CreateObject("StdFont")
f:Name := "Tahoma"
f:Size := 12
oItems := oGantt:Items()
oItems:SetProperty("ItemFont",oItems:AddItem("new font"),f)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
341
|
How do I vertically align a cell
![](images/exganttq341.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:DrawGridLines := -2/*exRowLines*/
oGantt:Columns():Add("MultipleLine"):SetProperty("Def",16/*exCellSingleLine*/,.F.)
oGantt:Columns():Add("VAlign")
oItems := oGantt:Items()
h := oItems:AddItem("This is a bit of long text that should break the line")
oItems:SetProperty("CellCaption",h,1,"top")
oItems:SetProperty("CellVAlignment",h,1,0/*TopAlignment*/)
h := oItems:AddItem("This is a bit of long text that should break the line")
oItems:SetProperty("CellCaption",h,1,"middle")
oItems:SetProperty("CellVAlignment",h,1,1/*MiddleAlignment*/)
h := oItems:AddItem("This is a bit of long text that should break the line")
oItems:SetProperty("CellCaption",h,1,"bottom")
oItems:SetProperty("CellVAlignment",h,1,2/*BottomAlignment*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
340
|
How can I change the position of an item
![](images/exganttq340.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:AddItem("Item 1")
oItems:AddItem("Item 2")
oItems:SetProperty("ItemPosition",oItems:AddItem("Item 3"),0)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
339
|
How do I find an item based on a path
![](images/exganttq339.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:SetProperty("ItemData",oItems:InsertItem(h,,"Child 2"),1234)
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("ItemBold",oItems:FindPath("Root 1\Child 1"),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
338
|
How do I find an item based on my extra data
![](images/exganttq338.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:SetProperty("ItemData",oItems:InsertItem(h,,"Child 2"),1234)
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("ItemBold",oItems:FindItemData(1234),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
337
|
How do I find an item
![](images/exganttq337.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("ItemBold",oItems:FindItem("Child 2",0),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
336
|
How can I insert a hyperlink or an anchor element
![](images/exganttq336.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems,oItems1
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Column")
oItems := oGantt:Items()
oItems:SetProperty("CellCaptionFormat",oItems:AddItem("Just an <a1>anchor</a> element ..."),0,1/*exHTML*/)
oItems1 := oGantt:Items()
oItems1:SetProperty("CellCaptionFormat",oItems1:AddItem("Just another <a2>anchor</a> element ..."),0,1/*exHTML*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
335
|
How do I find the index of the item based on its handle
![](images/exganttq335.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("ItemBold",oItems:ItemByIndex(oItems:ItemToIndex(h)),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
334
|
How do I find the handle of the item based on its index
![](images/exganttq334.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("ItemBold",oItems:ItemByIndex(1),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
333
|
How can I find the cell being clicked in a radio group
![](images/exganttq333.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:MarkSearchColumn := .F.
oGantt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,128 } ) , .F. ))
oGantt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. ))
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oGantt:Columns():Add("C3")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"Radio 1")
oItems:SetProperty("CellHasRadioButton",h,1,.T.)
oItems:SetProperty("CellRadioGroup",h,1,1234)
oItems:SetProperty("CellCaption",h,2,"Radio 2")
oItems:SetProperty("CellHasRadioButton",h,2,.T.)
oItems:SetProperty("CellRadioGroup",h,2,1234)
oItems:SetProperty("CellState",h,1,1)
oItems:SetProperty("CellBold",,oItems:CellChecked(1234),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
332
|
Can I add a +/- ( expand / collapse ) buttons to each item, so I can load the child items later
![](images/exganttq332.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:LinesAtRoot := -1/*exLinesAtRoot*/
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("ItemHasChildren",oItems:AddItem("parent item with no child items"),.T.)
oItems:AddItem("next item")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
331
|
Can I let the user to resize at runtime the specified item
![](images/exganttq331.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:ScrollBySingleLine := .T.
oGantt:DrawGridLines := -2/*exRowLines*/
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
oItems:SetProperty("ItemAllowSizing",oItems:AddItem("resizable item"),.T.)
oItems:AddItem("not resizable item")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
330
|
How can I change the size ( width, height ) of the picture
![](images/exganttq330.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:SetProperty("CellPicture",h,0,oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)"))
oItems:SetProperty("CellPictureWidth",h,0,24)
oItems:SetProperty("CellPictureHeight",h,0,24)
oItems:SetProperty("ItemHeight",h,32)
h := oItems:AddItem("Root 2")
oItems:SetProperty("CellPicture",h,0,oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)"))
oItems:SetProperty("ItemHeight",h,48)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
329
|
How can I find the number or the count of selected items
![](images/exganttq329.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:SingleSel := .F.
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("SelectItem",oItems:ItemChild(h),.T.)
oItems:SetProperty("SelectItem",oItems:NextSiblingItem(oItems:ItemChild(h)),.T.)
oItems:AddItem(oItems:SelectCount())
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
328
|
How do I unselect an item
![](images/exganttq328.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("SelectItem",h,.F.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
327
|
How do I find the selected item
![](images/exganttq327.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("SelectItem",h,.T.)
oItems:SetProperty("ItemBold",oItems:SelectedItem(0),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
326
|
How do I un select all items
![](images/exganttq326.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:SingleSel := .F.
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:UnselectAll()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
325
|
How do I select multiple items
![](images/exganttq325.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:SingleSel := .F.
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("SelectItem",oItems:ItemChild(h),.T.)
oItems:SetProperty("SelectItem",oItems:NextSiblingItem(oItems:ItemChild(h)),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
324
|
How do I select all items
![](images/exganttq324.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:SingleSel := .F.
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SelectAll()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
323
|
How do I select an item
![](images/exganttq323.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("SelectItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
322
|
Can I display a button with some picture or icon inside
![](images/exganttq322.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:SetProperty("HTMLPicture","p1","c:\exontrol\images\zipdisk.gif")
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1," Button <img>p1</img> ")
oItems:SetProperty("CellCaptionFormat",h,1,1/*exHTML*/)
oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/)
oItems:SetProperty("CellHasButton",h,1,.T.)
oItems:SetProperty("CellButtonAutoWidth",h,1,.T.)
oItems:SetProperty("ItemHeight",h,48)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
321
|
Can I display a button with some picture or icon inside
![](images/exganttq321.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1," Button <img>1</img> ")
oItems:SetProperty("CellCaptionFormat",h,1,1/*exHTML*/)
oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/)
oItems:SetProperty("CellHasButton",h,1,.T.)
oItems:SetProperty("CellButtonAutoWidth",h,1,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
320
|
Can I display a button with some icon inside
![](images/exganttq320.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1," <img>1</img> ")
oItems:SetProperty("CellCaptionFormat",h,1,1/*exHTML*/)
oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/)
oItems:SetProperty("CellHasButton",h,1,.T.)
oItems:SetProperty("CellButtonAutoWidth",h,1,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
319
|
How can I assign multiple icon/picture to a cell
![](images/exganttq319.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:SetProperty("HTMLPicture","p1","c:\exontrol\images\zipdisk.gif")
oGantt:SetProperty("HTMLPicture","p2","c:\exontrol\images\auction.gif")
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("text <img>p1</img> another picture <img>p2</img> and so on")
oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
oItems:SetProperty("CellPicture",h,0,oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\colorize.gif`)"))
oItems:SetProperty("ItemHeight",h,48)
oItems:AddItem("Root 2")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
318
|
How can I assign an icon/picture to a cell
![](images/exganttq318.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:SetProperty("CellPicture",h,0,oGantt:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)"))
oItems:SetProperty("ItemHeight",h,48)
oItems:AddItem("Root 2")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
317
|
How can I assign multiple icons/pictures to a cell
![](images/exganttq317.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root <img>1</img> 1, <img>2</img>, ... and so on ")
oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
316
|
How can I assign multiple icons/pictures to a cell
![](images/exganttq316.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:SetProperty("CellImages",h,0,"1,2,3")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
315
|
How can I assign an icon/picture to a cell
![](images/exganttq315.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:SetProperty("CellImage",h,0,1)
oItems:SetProperty("CellImage",oItems:InsertItem(h,,"Child 1"),0,2)
oItems:SetProperty("CellImage",oItems:InsertItem(h,,"Child 2"),0,3)
oItems:SetProperty("ExpandItem",h,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
314
|
How can I get the handle of an item based on the handle of the cell
![](images/exganttq314.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("Default")
oItems := oGantt:Items()
h := oItems:AddItem("Root 1")
oItems:InsertItem(h,,"Child 1")
oItems:InsertItem(h,,"Child 2")
oItems:SetProperty("ExpandItem",h,.T.)
oItems:SetProperty("ItemBold",oItems:CellItem(oItems:ItemCell(h,0)),.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
313
|
How can I display a button inside the item or cell
![](images/exganttq313.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1," Button 1 ")
oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/)
oItems:SetProperty("CellHasButton",h,1,.T.)
oItems:SetProperty("CellButtonAutoWidth",h,1,.T.)
h := oItems:AddItem("Cell 2")
oItems:SetProperty("CellCaption",h,1," Button 2 ")
oItems:SetProperty("CellHAlignment",h,1,1/*CenterAlignment*/)
oItems:SetProperty("CellHasButton",h,1,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
312
|
How can I change the state of a radio button
![](images/exganttq312.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:MarkSearchColumn := .F.
oGantt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,128 } ) , .F. ))
oGantt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. ))
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oGantt:Columns():Add("C3")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"Radio 1")
oItems:SetProperty("CellHasRadioButton",h,1,.T.)
oItems:SetProperty("CellRadioGroup",h,1,1234)
oItems:SetProperty("CellCaption",h,2,"Radio 2")
oItems:SetProperty("CellHasRadioButton",h,2,.T.)
oItems:SetProperty("CellRadioGroup",h,2,1234)
oItems:SetProperty("CellState",h,1,1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
311
|
How can I assign a radio button to a cell
![](images/exganttq311.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:MarkSearchColumn := .F.
oGantt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,128 } ) , .F. ))
oGantt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. ))
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oGantt:Columns():Add("C3")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"Radio 1")
oItems:SetProperty("CellHasRadioButton",h,1,.T.)
oItems:SetProperty("CellRadioGroup",h,1,1234)
oItems:SetProperty("CellCaption",h,2,"Radio 2")
oItems:SetProperty("CellHasRadioButton",h,2,.T.)
oItems:SetProperty("CellRadioGroup",h,2,1234)
oItems:SetProperty("CellState",h,1,1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
310
|
How can I change the state of a checkbox
![](images/exganttq310.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"Check Box")
oItems:SetProperty("CellHasCheckBox",h,1,.T.)
oItems:SetProperty("CellState",h,1,1)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
309
|
How can I assign a checkbox to a cell
![](images/exganttq309.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"Check Box")
oItems:SetProperty("CellHasCheckBox",h,1,.T.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
308
|
How can I display an item or a cell on multiple lines
![](images/exganttq308.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:ScrollBySingleLine := .T.
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines")
oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
307
|
How can I assign a tooltip to a cell
![](images/exganttq307.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"tooltip")
oItems:SetProperty("CellToolTip",h,1,"This is bit of text that's shown when the user hovers the cell")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
306
|
How can I associate an extra data to a cell
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"Cell 2")
oItems:SetProperty("CellData",h,1,"your extra data")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
305
|
How do I enable or disable a cell
![](images/exganttq305.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"Cell 2")
oItems:SetProperty("CellEnabled",h,1,.F.)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
304
|
How do I change the cell's foreground color
![](images/exganttq304.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"Cell 2")
oItems:SetProperty("CellForeColor",h,1,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
303
|
How do I change the visual effect for the cell, using your EBN files
![](images/exganttq303.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"Cell 2")
oItems:SetProperty("CellBackColor",h,1,0x1000000)
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
302
|
How do I change the cell's background color
![](images/exganttq302.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
LOCAL h
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
h := oItems:AddItem("Cell 1")
oItems:SetProperty("CellCaption",h,1,"Cell 2")
oItems:SetProperty("CellBackColor",h,1,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
301
|
How do I change the caption or value for a particular cell
![](images/exganttq301.png)
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oGantt
LOCAL oItems
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oGantt := XbpActiveXControl():new( oForm:drawingArea )
oGantt:CLSID := "Exontrol.Gantt.1" /*{09C0C400-3A0F-4CD3-8B93-8D42FCE66726}*/
oGantt:create(,, {10,60},{610,370} )
oGantt:Columns():Add("C1")
oGantt:Columns():Add("C2")
oItems := oGantt:Items()
oItems:SetProperty("CellCaption",oItems:AddItem("Cell 1"),1,"Cell 2")
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|